package com.wolfpire.subject.service;

import java.util.List;
import java.util.Map;

import com.wolfpire.system.common.Page;
import com.wolfpire.system.common.base.service.IBaseHibernateService;
import com.wolfpire.system.model.Profession;
import com.wolfpire.system.model.Subject;
import com.wolfpire.system.model.User;

/**
 * 学科模块 业务层接口
 * @author xp
 *
 */
public interface SubjectService extends IBaseHibernateService<Subject, Long> {
	
	
	/**
	 * 获取账户信息
	 * @param account
	 * @return
	 */
	public Subject getByName(String name);
	
	/**
	 * 查询用户列表(带分页)
	 * @param page<User> 
	 * @param filterUser
	 * @return
	 */
	public Page<Subject> setPageDataList(Page<Subject> page, Subject filterSubject);
	
	/**
	 * 绘制选择过课程的列表
	 * @param page
	 * @param filterSubject
	 * @param usergrouoId
	 * @return
	 */
	public Page<Map<String, Object>> findSubjects(Page<Map<String, Object>> page,Subject filterSubject, long usergrouoId);
	/**
	 * 根据专业ID获取用户
	 * @param orgId
	 * @return
	 */
	public List<Subject> getSubjectsByProfessionId(Long professionId);
	
	/**
	 * 获取完整信息的用户
	 * @param id	用户主键Id
	 * @return
	 */
	public Subject getCompleteSubject(Long id);
	
	/**
	 * 构建专业学科树
	 * @param subject
	 * @return
	 */
	public List<Map<String, Object>> bulidTree(Subject subject);
	
	/**
	 * 查找出条数
	 * @param num
	 * @return
	 */
	public List<Subject> list(int num);
	
	public Subject getById(long id);
	
	public void relate(Long usergroupId, Long subjectId);
	
	/**
	 * 绑定用户组和课程
	 * @param id
	 * @param subjectIdsStr
	 */
	public void saveUserGroupSubject(Long id, String subjectIdsStr);
	
	public List<Subject> findSubjectByUserGroupId(long userGroupId);
	
	public List<Subject> findAllSubject();
}
